from sklearn.metrics import confusion_matrix, classification_report, roc_curve, auc, precision_recall_curve, average_precision_score
import numpy as np


# xgboost取0.25做阈值
if __name__ == '__main__':
    wh_xgboost_labels = np.load('D:/lung_cancer/data/two_result/two_xgboost_wh_labels.npy')
    wh_xgboost_preds = np.load('D:/lung_cancer/data/two_result/two_xgboost_wh_preds.npy')
    print(len(wh_xgboost_preds))
    for i in range(len(wh_xgboost_preds)):
        if wh_xgboost_preds[i]>0.25:
            wh_xgboost_preds[i]=1
        else:
            wh_xgboost_preds[i]=0
    print(wh_xgboost_labels)
    print(wh_xgboost_preds)